﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HR_Business
{
    public partial class EmploymentType
    {
         HRDBContext _DatabaseContext;

        public EmploymentType() : this(new HRDBContext()) { }

        public EmploymentType(HRDBContext HRDBContext)
        {
            _DatabaseContext = HRDBContext;
        }
       
        public EmploymentType GetEmploymentTypeByEmploymentTypeId(int EmploymentTypeId)
        {
            return _DatabaseContext.EmploymentTypes.FirstOrDefault(EmploymentType => EmploymentType.Id == EmploymentTypeId);
        }

        public List<EmploymentType> GetAllEmploymentTypes()
        {
            return _DatabaseContext.EmploymentTypes.ToList();
        }

    }
}
